import { defHttp } from "@/utils/http";

// ERP 仓库管理表 API
export const warehousesApi = {
	// 查询仓库管理列表
	warehousesList: async (params: any) => {
		return await defHttp.get({ url: `/whs/warehouses/page`, params });
	},
	// 新增仓库管理
	warehousesCreate: async (data: any) => {
		return await defHttp.post({ url: `/whs/warehouses/create`, data });
	},

	// 修改仓库管理
	warehousesUpdate: async (data: any) => {
		return await defHttp.put({ url: `/whs/warehouses/update`, data });
	},

	// 删除仓库管理
	warehousesDelete: async (id: number) => {
		return await defHttp.delete({ url: `/whs/warehouses/delete?id=` + id });
	}
};
